import { defineStore } from "pinia";
import {ref,reactive} from "vue"
export const roleListStore = defineStore("roleListStoreId", () => {
    const detailData = ref([
        {
            type:"text",
            prop:"code",
            name:"角色编码",
            value:null
        },
        {
            type:"text",
            prop:"name",
            name:"角色名称",
            value:null
        },
        {
            type:"text",
            prop:"isEnabled",
            name:"是否启用",
            value:null
        },
        {
            type:"text",
            prop:"department",
            name:"部门",
            value:null
        },
        {
            type:"text",
            prop:"remarks",
            name:"备注",
            value:null
        }
    ])
    const tableProp = reactive(
        {
            name: "roleList",
            propsList: [
                {
                    label: '角色编码',
                    prop: 'code',
                    type: 'normal',
                    minWidth: '150px',
                    hidden: true,
                },
                {
                    label: '角色名称',
                    prop: 'name',
                    type: 'normal',
                    minWidth: '150px',
                    hidden: true,
                },
                {
                    label: '是否启用',
                    prop: 'isEnabled',
                    type: 'custom',
                    slotName:'roleStatus',
                    minWidth: '150px',
                    hidden: true,
                },
                {
                    label: '部门',
                    prop: 'department',
                    type: 'normal',
                    minWidth: '150px',
                    hidden: true,
                },
                {
                    type: 'handle',
                    label: '操作',
                    width: '250px',
                    btnType: ' link',
                    slotName: 'handle',
                    hidden: true,
                }
            ]
    })
    
    return {
        detailData, tableProp
    }
})